package com.jv.spring.importresource.scan;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.stereotype.Component;

@Component
public class MyBeanPostProcessor implements BeanPostProcessor {
	public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
		if(beanName.contains("dept")){
			System.out.println("postProcessBeforeInitialization");
		}
		return bean;
	}

	public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
		if(beanName.contains("dept")){
			System.out.println("postProcessAfterInitialization");
		}
		return bean;
	}
}
